home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Report Writers / Crystal Repot 9.0 Full CD version / Setup.exe / Windows / System32 / HTMLRE90.DLL / HTML / 11753 < prev    next >
Encoding:
Text File  |  2002-07-05  |  6.0 KB  |  214 lines

  1. <HTML>
  2.  
  3. <HEAD>
  4.  
  5. <link REL="stylesheet" TYPE="text/css" HREF="%1css/default.css">
  6.  
  7. <script language="Javascript">
  8. //LOCALIZATION STRINGS
  9.  
  10. var _strDomainNameTooLong = "Please limit the domain name to 255 characters.";
  11. var _strDomainNameMissing = "Please enter a domain name.";
  12.  
  13. var _strServerNameTooLong = "Please limit the server name to 255 characters.";
  14. var _strServerNameMissing = "Please enter a server name.";
  15.  
  16. var _strPosIntPort= "The port value must be a whole number greater than zero.";
  17.  
  18. var _strUserNameTooLong = "Please limit the user name to 255 characters.";
  19.  
  20. var _strPasswordTooLong = "Please limit the password to 255 characters.";
  21.  
  22. var _strSendAddressTooLong = "Please limit the sender address to 255 characters.";
  23. var _strSendAddressNameMissing = "Please enter a sender address in the From field.";
  24.  
  25. </script>
  26.  
  27. <script language=Javascript>
  28. function onSubmit()
  29. {
  30.   if ( !checkStringParam (document.forms.destForm.domainName, _strDomainNameTooLong, _strDomainNameMissing))
  31.     return;
  32.   if ( !checkStringParam (document.forms.destForm.serverName, _strServerNameTooLong, _strServerNameMissing))
  33.     return;
  34.  
  35.   // Check port
  36.   var regNumber = /^^\d+$/
  37.   var portvalue = document.forms.destForm.port.value;
  38.   if(!regNumber.test(portvalue) || portvalue == 0)
  39.   {
  40.     alert(_strPosIntPort);
  41.     document.forms.destForm.port.focus();
  42.     return;
  43.   }
  44.  
  45.   if ( !checkStringParam (document.forms.destForm.smtpUserName, _strUserNameTooLong))
  46.     return;
  47.   if ( !checkStringParam (document.forms.destForm.smtpPassword, _strPasswordTooLong))
  48.     return;
  49.   if ( !checkStringParam (document.forms.destForm.senderAddress, _strSendAddressTooLong, _strSendAddressNameMissing))
  50.     return;
  51.  
  52.     // Submit the properies
  53.     document.destForm.submit();
  54. }
  55.  
  56. function checkStringParam (ele, lengthMsg)    // Optional 3rd param missginMsg
  57. {
  58.   var isOK = true;
  59.   var str = ele.value;
  60.  
  61.   // Optionally check existence
  62.   if (arguments.length == 3)
  63.   {
  64.     var missingMsg = arguments[2];
  65.     if (str.length == 0)
  66.     {
  67.       alert(missingMsg);
  68.       isOK = false;
  69.     }
  70.   }
  71.   if (str.length > 255)
  72.   {
  73.     alert(lengthMsg);
  74.     isOK = false;
  75.   }
  76.  
  77.   if (!isOK)
  78.     ele.focus();
  79.  
  80.   return isOK;
  81. }
  82.  
  83. function onCancel()
  84. {
  85.   document.forms[0].reset();
  86. }
  87.  
  88. function addProperty()
  89. {
  90.   var destForm = 'destForm';
  91.   var prop = document.forms[destForm].props.options[document.forms[destForm].props.selectedIndex].value;
  92.   document.forms[destForm].specname.value = document.forms[destForm].specname.value + prop;
  93.   document.forms[destForm].specname.focus();
  94. }
  95.  
  96. function onSetFileDisabled()
  97. {
  98.     onSetFilenameDisabled( !document.destForm.useattachmentchk.checked );
  99.     document.destForm.useattachment.value = document.destForm.useattachmentchk.checked;
  100. }
  101.  
  102. function addLink()
  103. {
  104.     var prop = "%SI_VIEWER_URL%";
  105.     document.forms['destForm'].msg.value = document.forms['destForm'].msg.value + "\n" + prop;
  106.     document.forms['destForm'].msg.focus();
  107. }
  108. </script>
  109.  
  110. </HEAD>
  111.  
  112. <BODY TOPMARGIN="0" LEFTMARGIN="5" MARGINHEIGHT="0" MARGINWIDTH="5" onload='onSetFileDisabled()'>
  113.   <form action="%2" method="post" name="destForm" target="_self">
  114.  
  115.     <table width='95%'>
  116.       <tr><td><table>
  117.  
  118.         <tr>
  119.           <td class="list">Domain Name:</td>
  120.           <td class="list"><input name="domainName" value="%3" size=40></td>
  121.         </tr>
  122.  
  123.         <tr>
  124.           <td class="list">Server Name:</td>
  125.           <td class="list"><input name="serverName" value="%4" size=40></td>
  126.         </tr>
  127.  
  128.         <tr>
  129.           <td class="list">Port:</td>
  130.           <td class="list"><input name="port" value="%5" size=4></td>
  131.         </tr>
  132.  
  133.  
  134.         <tr>
  135.           <td class="list">Authentication:</td>
  136.           <td class="list">
  137.             <select name="authenticationType">
  138. %6
  139.           </select></td>
  140.         </tr>
  141.  
  142.         <tr>
  143.           <td class="list">SMTP User Name:</td>
  144.           <td class="list"><input name="smtpUserName" value="%7" size=40></td>
  145.         </tr>
  146.  
  147.         <tr>
  148.           <td class="list">SMTP Password:</td>
  149.           <td class="list"><input type=password name="smtpPassword" value="%8" size=40></td>
  150.         </tr>
  151.  
  152.         <tr>
  153.           <td class="list">From:</td>
  154.           <td class="list"><input name="senderAddress" value="%9" size=40></td>
  155.         </tr>
  156.  
  157.         <tr>
  158.           <td class='list'>To:</td>
  159.           <td class='list'><input name='to' size=40 value='%10'></td>
  160.         </tr>
  161.  
  162.         <tr>
  163.           <td class='list'>Cc:</td>
  164.           <td class='list'><input name='cc' size=40 value='%11'></td>
  165.         </tr>
  166.  
  167.         <tr>
  168.           <td class='list'>Subject:</td>
  169.           <td class='list'><input name='subject' size=40 value='%12'></td>
  170.         </tr>
  171.  
  172.         <tr>
  173.          <td class='list' valign='top'>Message:</td>
  174.          <td class='list'><textarea wrap='virtual' name='msg' rows='7' cols='40'>%13</textarea><BR>
  175.             Add viewer hyperlink to message body <input type="button" name="addLinkBtn" onclick="addLink();" value = " Add ">
  176.          </td>
  177.         </tr>
  178.  
  179.       </table></td></tr>
  180.     </table>
  181.  
  182.     <table>
  183.       <tr>
  184.         <td class='list' valign='top'><input type=checkbox name='useattachmentchk' %15 onclick="javascript:onSetFileDisabled();"></td>
  185.         <td class='list' valign='middle'> Attach report instance to email message <input type='hidden' name='useattachment' value="true"></td>
  186.       </tr>
  187.       <tr>
  188.         <td class='list' valign='top'> </td>
  189.         <td class='list' valign='top'>
  190. %14
  191.         </td>
  192.       </tr>
  193.     </table>
  194.     <br>
  195.  
  196.     <table align=center CELLPADDING="0" CELLSPACING="5" border=0 width=20%>
  197.       <tr>
  198.           <td>
  199.           <table cellpadding=0 border=0> 
  200.                 <tr>
  201.                     <td class="clsButton" align=middle nowrap>
  202.                         <div class="clsButton"><a href="javascript:onSubmit()">Update</a></div></td>
  203.                     <td class="clsButton" align=middle nowrap>
  204.                         <div class="clsButton"><a href="javascript: onCancel()">Reset</a></div></td>
  205.                 </tr>
  206.             </table>
  207.         </td>
  208.       </tr>    
  209.     </table>
  210.  
  211.   </form>
  212. </BODY>
  213. </HTML>
  214.